using HarmonyLib;
using UnityEngine;
using System.Reflection;
using System;

namespace hatbox_hack
{
    [HarmonyPatch(typeof(Enemy))]
    public static class EnemyPatch
    {
        [HarmonyPatch("GetDefaultXSpeedForState")]
        [HarmonyPostfix]
        public static void GetDefaultXSpeedForStatePatch(ref float __result,EnemyState es)
        {
            if (Contract.I.EnemySpeedy) {
                __result *= Contract.I.EnemySpeedyMultiplexer;
            }
            if (Contract.I.EnemyRunMan && es == EnemyState.kAlerted) {
                __result *= Contract.I.EnemyRunManMultiplexer;
            }
        }
    }
}
